#ifndef CONFIG_MEMORY_H
#define CONFIG_MEMORY_H

//Note: Array versions not implemented but can be done.

#define SSMT_NEW_ALIGNED(type,arena,alignment) new (arena.allocate(sizeof(type),alignment,__FILE__,__LINE__)) type
#define SSMT_NEW(type,arena) SSMT_NEW_ALIGNED(type,arena,SSMT_ALIGN(type))
#define SSMT_DELETE(object, arena) Delete(object, arena)

template <typename T, class ARENA>
void Delete(T* object, ARENA& arena)
{
    object->~T();
    arena.deallocate(object);
}

#endif CONFIG_MEMORY_H